﻿using ContactCenter.Core;
using ContactCenter.Core.Common;
using ContactCenter.Core.ObjectModel;
using ContactCenter.Persistence.NH;
using ContactCenter.Persistence.NH.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NHibernate.Cfg;

namespace ContactCenter.AuditEventListener.Tests
{
    /// <summary>
    /// Integration tests for Audit Event Listener.
    /// </summary>
    [TestClass]
    public class CreateSchemaFixture
    {
        [TestMethod]
        public void CanBuildSchemaInProductionEnvironment()
        {
            TaskExecutor.Execute(
                                    new MsSqlDbTask().Force(),
                                    new DomainMappingTask(),
                                    new AuditListenerTask(),
                                    new AuditListenerMappingTask(),
                                    new SchemaExportTask()
                                );
        }

        [TestMethod]
        public void CanBuildSchemaInTestEnvironment()
        {
            TaskExecutor.Execute(
                        new SqliteDbTask(),
                        new DomainMappingTask(),
                        new AuditListenerTask(),
                        new AuditListenerMappingTask(),
                        new SchemaExportTask()
                    );
        }
    }
}